package com.example.litterpainterdemo.draw.shapes

import android.graphics.Canvas
import android.graphics.Path
import android.graphics.PointF
import android.util.Log

class CurveShape:Shape() {
    private val mPath:Path by lazy {
        Path().apply {
            //设置起始点
            moveTo(startPoint.x,startPoint.y)
        }
    }

    override fun insideTheShape(dx:Float,dy:Float):Boolean{
        return false
    }

    override fun drawShape(canvas: Canvas?) {
        mPath.lineTo(endPoint.x,endPoint.y)
        canvas?.drawPath(mPath,mPaint)
    }
}